{extend name='layout:app' /}

{block name='css'}
<!--<link rel="stylesheet" href="__STATIC__/css/help.css">-->
<style>
    .contact-info{
        margin-top: 40px;
    }
    .item{
        line-height: 60px;
        letter-spacing: 2px;
        font-size: 18px;
        font-weight: normal;
        border-bottom: 3px solid white;
    }
    .item img{
        width: 5%;
        margin-left: 25px;
    }
</style>
{/block}

{block name='content'}
<div id="app">
    <div class="nav">
        <i class="el-icon-arrow-left icon_left" @click="back"></i>
        <div>联系客服</div>
        <i class="iconfont icon-home icon_right" @click="home"></i>
    </div>
    <div class="contact-info">
        <div class="item" @click="infoShow">
<!--            <el-button type="primary" style="background-color: #F0F0F0">-->
            <img src="/static/imgs/kefu.png" alt="">
            <span>客服1</span>
<!--            </el-button>-->
        </div>
        <div class="item" @click="infoShow">
            <img src="/static/imgs/kefu.png" alt="">
            <span>客服2</span>
        </div>
        <el-dialog
                title="提示"
                :visible.sync="infoDialog"
                width="75%"
                center>
            <span v-html="infoContent"></span>
        </el-dialog>
    </div>
</div>
{/block}
{block name='js'}
<script>
    var that
    new Vue({
        el:'#app',
        data: {
            phone: '',
            pwd: '',
            infoContent: '',
            infoDialog: false
        },
        mounted() {
            that = this  //生成vue副本
        },
        methods: {
            back() {
                window.history.go(-1)
            },
            home() {
                location.href = '/'
            },
            infoShow(e) {
                const info = $(e.currentTarget).text()
                // console.log(info)
                if(info.includes( '客服1')) {
                    console.log(this.infoContent)
                    this.infoContent = '扫描二维码加好友：<br><img src="__STATIC__/imgs/two-code1.png" alt="">'
                }
                if(info.includes('客服2')) {
                    this.infoContent = '扫描二维码加好友：<br><img src="__STATIC__/imgs/two-code2.png" alt="">'
                }
                // if(info.includes('联系热线')) {
                //     this.infoContent = '联系热线：<a href="tel:15351217062">15351217062</a>'
                // }
                this.infoDialog = true
            },
            callPhone() {
                if(this.infoContent.includes('联系热线')) {
                    location.href = 'tel:15351217062'
                }else {
                    this.infoDialog = false
                }
            },
            btnReg() {
                $.post('',{phone:this.phone,pwd:this.pwd},function (res) {
                },'json')
            }
        }
    });


</script>
{/block}